Retrofit+RxJava实战日志(1)-在Android Studio中配置 在build.gradle中添加12345678910111213141516171819202122232425262728//加入retrolambda需要的plugin声明apply plugin: 'me.tatarka.retrolambda' //retrolambda的编译路径依赖 buildscript { dependencies { classpath 'me.tatarka:gradle-retrolambda:3.1.0' }}//让IDE使用用Java8语法解析android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }}//编译RxJavacompile 'io.reactivex:rxjava:1.0.14' //编译RxAndroidcompile 'io.reactivex:rxandroid:1.0.1'//编译Retrofit及其相关库,包括Gsoncompile 'com.squareup.retrofit:retrofit:2.0.0-beta2'compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta2'compile 'com.google.code.gson:gson:2.4' Retrolambda是借用Java8的语法特性,需要配置好Java8安装好Java8后在File > Project structure > SDK Location中配置Java8路径 2016-01-19 RetrofitRxJava